home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_8 / issue_04 / squirrel / !SqlFront / !Help < prev    next >
Encoding:
Text File  |  1994-11-17  |  3.9 KB  |  84 lines

  1. Squirrel Query Front End
  2. ========================
  3.  
  4. This utility can provide a general purpose front end to commonly used
  5. queries where only one parameter varies.  The SqlFront program and the
  6. SFTemplate file are common to all uses of the utility and can be
  7. stored in the Library directory or other common resource area.  The
  8. pathname SqlLib in the !Run file must be amended accordingly.
  9.  
  10. Apart from these the utility requires a suitable Query file or
  11. files and an optional Description file which must be called 'desc'. If
  12. the output type is 'query' then the Query file must be called
  13. 'Queryfile'.  If the output type is 'report' there must be two Query
  14. files called 'Preview' and 'Print'. If different sprites are to be
  15. used for the icon bar sprite and within the Front End window these
  16. should be held in a suitable Sprite file and placed in the Sprite Pool
  17. using an 'Iconsprites' call.
  18.  
  19. The Description file is a text file which must include a block of
  20. statements each on a new line, enclosed between 'begin' and 'end.' (NB
  21. the full stop.)  Any text may be added outside this block. The file
  22. must end with a carriage return. Each statement consists of a label
  23. and a value separated by a colon.  Any additional spaces are ignored. 
  24. The order of the labels is not significant and all statements are
  25. optional.  Any missing values will be supplied from a default list. 
  26. Values may be enclosed in double quotes.  
  27.  
  28. Valid labels and their value meanings are:
  29.   
  30.   output        - the type of output (must be either 'query' or
  31.                   'report' - default is 'query')
  32.   input         - the type of input (must be either 'none' or
  33.                   'writable' - default is 'writable')                
  34.   iconbarsprite - the name of the sprite used on the icon bar (default
  35.                   is not to install the utility on the icon bar)
  36.   titlebar      - the text in the Front End window's title bar
  37.                   (default 'Squirrel Front End')
  38.   heading1      - the left hand heading (default 'Squirrel')
  39.   heading2      - the right hand heading (default 'Query')
  40.   sprite        - the name of a sprite positioned between the headings
  41.                   (default '!squirrel')
  42.   prompt        - an instruction to the user (default 'Enter search
  43.                   value and click OK:')
  44.   field         - the name of the query field.  If this parameter is
  45.                   not provided only the search value is passed to the
  46.                   query. For string fields, two field names may be
  47.                   given separated by a comma.
  48.   type          - the field type of the query field (default 'string')
  49.   case          - the field's case (must be 'mixed', 'upper','lower',
  50.                   or 'none' - default 'mixed')
  51.   
  52. In order to use the value entered, the Query filter must contain the
  53. system variable @User$Query.  Allowable field types are string,
  54. number, text, date and boolean.  If the type is 'string', the operator
  55. used is LIKE and a % is automatically added to the value.  If two
  56. fieldnames are specified the user may enter values for two fields
  57. separated by a space.  If no second value is given it is the SECOND
  58. fieldname which is used.  If the type is 'text' the search is
  59. automatically a sliding search of the whole field. For all other
  60. types, the operator used is =.  Provided a fieldname is supplied the
  61. filter box should contain only: @User$Query. If a fieldname is not
  62. supplied, the filter box will contain something like:
  63.    name = @User$Query
  64. NB quote marks should not be included.
  65.  
  66. Listed below is an example Description file with all the parameters
  67. specified.
  68.  
  69. # Description file for General Purpose Query Front End
  70.  
  71. begin
  72.   output        : query
  73.   input         : writable
  74.   iconbarsprite : !findpupil
  75.   titlebar      : Find Pupil
  76.   heading1      : Crozier Academy
  77.   heading2      : Pupil Records
  78.   sprite        : crozier
  79.   prompt        : Enter (given name and) surname and click OK:
  80.   field         : given_name,surname
  81.   type          : string
  82.   case          : mixed
  83. end.
  84.